package com.lanyeo.liver

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent

class MessageReceiver : BroadcastReceiver() {
    private lateinit var listener: ReceiveListener

    fun setReceiveListener(listener: ReceiveListener) {
        this.listener = listener
    }

    override fun onReceive(context: Context, intent: Intent) {
        this.listener.onMessage(intent)
    }

    interface ReceiveListener {
        fun onMessage(intent: Intent)
    }
    companion object {
        const val MSG = "com.lanyeo.liver.MessageReceiver"
    }
}